//
// Created by 花总 on 2023/3/18.
//

#ifndef INC_15_FUNCTION_H
#define INC_15_FUNCTION_H

#include <stdlib.h>
#include <stdio.h>

typedef char BiElemType;
typedef struct BiTNode {
    BiElemType c;
    struct BiTNode *lchild;
    struct BiTNode *rchild;
} BiTNode, *BiTree;

//辅助队列
typedef struct Queue {
    BiTree p;
    struct Queue *next;
} SqQueue, *pSqQueue;

//队列的结构体
typedef BiTree ElemType;
typedef struct LinkNode{
    ElemType data;
    struct LinkNode *next;
}LinkNode;
typedef struct{
    LinkNode *front,*rear;
}LinkQueue;

void InitQueue(LinkQueue &Q);
bool IsEmpty(LinkQueue Q);
void EnQueue(LinkQueue &Q,ElemType element);
bool DeQueue(LinkQueue &Q,ElemType &element);


#endif //INC_15_FUNCTION_H
